Network switching device with disparate database formats

ABSTRACT

A switching device for forwarding network traffic to a desired destination on a network, such as a telephone or computer network. The switching device includes multiple ports and uses a lookup table containing lookup keys to determine which port to forward network traffic over. The lookup table includes disparate forwarding databases that contain database entries in different formats. For example, one forwarding databases may relate to MAC addresses, while another database relates to IP addresses. The disparate databases are maintained in a single lookup table and a binary search engine searches the table without regard to the database format. Like-kind database entries are grouped within the lookup table and the lookup table is maintained in sorted order by prepending format identification bits to the lookup keys. Memory availability for the disparate databases can be dynamically changed allowing customization for a particular user application. Consequently, memory can be efficiently used and reallocated if needed.

FIELD OF THE INVENTION

This invention relates generally to networks, such as telephone andcomputer networks, and, more particularly, relates to routinginformation through such networks.

BACKGROUND OF THE INVENTION

A network allows two or more parties to communicate with each other. Intheir simplest form, networks generally include transmission lines andswitching devices (e.g., routers, switching routers, switches, etc.).The transmission lines carry signals (e.g., electrical, optical, etc.),while the switching devices are intermediate stations that establishtemporary connections between transmission lines. In telephone networks,for example, a caller's line goes to a switching device where the actualconnection is made to the called party. In computer networks, devicessuch as routers receive messages on the network and forward the messagesto their correct destinations. Computer networks can be as small as alocal area network (LAN) consisting of a few computers, printers, andother devices, or it can consist of many computers distributed over avast geographical area (e.g., the Internet).

An example computer network 10 is shown in FIG. 1A. The network includestwo local segments 12 and 14, and connection to a remote network 16.Nodes, labeled as A-J, represent computers connected to the localsegments. A switching device 20 includes three ports 22-24 and switchesnetwork traffic between segments 12, 14, and the remote network 16.Network 16 may also include switching devices, such as switching device21, which then connects other segments (not shown) to the network.Switching device 20 allows the nodes on one segment to communicate withnodes on other segments and to other switching devices. The nodescommunicate with each other through a protocol (e.g., HTTP, TCP/IP, SMB,etc.) which allows the nodes to transmit and receive network frames (anetwork frame includes a destination address, a source address, and adata field). When switching device 20 receives a frame from a node, itanalyzes the destination address by searching a lookup table 26, shownin FIG. 1B. Lookup table 26 includes table entries having a networkaddress field and a port field. When the destination address is matchedto a network address in the lookup table, switching device 20 determineswhich port to forward the frame to by obtaining the port numbercorresponding to the matched network address. For example, if node A onsegment 12 sends a message to node H on segment 14, switching device 20receives the message from node A and in response searches the entries inthe network address field of lookup table 26. Table entry 28 containsthe network address for H. A corresponding port field 30 for networkaddress H indicates that the frame should be forwarded over port 2.Additional background information on switches can be found in a numberof references, such as Fast Ethernet (1997) by L. Quinn et al., ComputerNetworks (3^(rd) Ed. 1996 by A. Tannenbaum, and High-Speed Networkingwith LAN Switches (1997) by G. Held, all of which are incorporatedherein by reference.

The switching device can obtain the network addresses for the lookuptable in different ways, depending on the particular implementation ofthe switching device. For example, the switching device may snoopnetwork traffic so that when a frame is received on a port, theswitching device determines if the frame's source address is in thetable and, if it is not, adds an entry containing the source address andthe inbound port to the table. Thus, the switching device is said to“learn ” addresses and port numbers from any frame that is transmittedby a node. Another technique some switching devices, such as routers,use to obtain the lookup table is from other switching devices through aspecial protocol. Thus, routers supply network addresses to each otherto supplement their lookup tables.

Some switching devices need to be able to forward network frames havingdifferent data frame formats. For example, a switching device mayforward network frames containing MAC addresses (48 bit address), IPaddresses (32 bit addresses), IPX addresses (32), IPV6 addresses (128bits), etc. FIG. 2 shows a prior art switching device 32 that forwardsframes of different formats. A packet analysis circuit 34 receives anetwork frame and analyzes its format. Based on the analysis, the packetanalysis circuit forwards address information from the network frameonto either a MAC search engine 36, an IP search engine 38, or an IPXsearch engine 40. Each search engine 36, 38, and 40 has access to itsown independent memory 42, 44, and 46, respectively, which storeforwarding information in the appropriate format for its search engine.When one of these search engines receives the address information, theyperform a search on their memory and pass forwarding informationobtained from the search onto other forwarding logic in the switch.

Using such a prior art switch has several drawbacks. First, the switchrequires a separate search engine and separate memory for each differentdatabase format, which is costly and inefficient. Second, the memoriesmust be sufficiently sized so that there is adequate memory space foreach database format, even though a particular user may only require afew entries having one format. For example, a user may only require afew MAC database entries, while requiring excessive IP entries. In sucha case, the memory containing MAC entries has wasted memory locations,while the memory storing IP entries is overloaded. Also, currently thereis no way to reallocate some of the extra IP entries into the sparememory locations in the MAC database.

An objective of the present invention, therefore, is to provide ahighspeed network switching device that can quickly and efficientlysearch through an address lookup table and that supports multipledatabase formats.

SUMMARY OF INVENTION

The present invention provides a switching device (e.g., router, switch,switching router, etc.) that forwards network traffic to a desireddestination on a network, such as a telephone or computer network. Theswitching device includes multiple ports and uses a lookup table todetermine which port to forward network traffic over. The networktraffic is typically in the form of network frames that include sourceand destination addresses.

In one aspect of the invention, a single lookup table can store multipledatabase formats for supporting different network protocols (e.g., MAC,IP, IPX, IPV6, Appletalk, etc.). The different database formats requireaddresses and forwarding information of different lengths. Additionally,a single search engine may be used to search the lookup table in orderto obtain the forwarding information.

In another aspect of the invention, the different database formats aregrouped into separate sections of memory, rather than intermingled, byprepending format identification bits to the most significant bitposition of the keys stored in the lookup table. As a result, the searchengine can perform the same search regardless of the database format.

Thus, the invention allows for a multi-database, single memory systemwherein the size of the database formats can be customized and changeddynamically for a particular user. Additionally, memory space is not afixed size for each database format, but, instead, can be changed toallow the databases to differ in size and for the size to dynamicallychange (i.e., the database sizes change while the switch isoperational). Additionally, the search engine algorithm is simplifiedsince it views the entire memory as a single database without regard tothe disparate database formats contained therein.

These advantages and other advantages and features of the inventionswill become apparent from the following detailed description, whichproceeds with reference to the following drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1A shows a known network containing multiple segments connectedthrough a switching device.

FIG. 1B shows a known lookup table stored in the switching device foridentifying nodes connected to the segments.

FIG. 2 shows a prior art switching device supporting multiple databaseformats.

FIG. 3 shows a switching device in accordance with the invention.

FIG. 4 is a flowchart of a method for forwarding network frames in theswitching device of FIG. 3.

FIG. 5 shows a lookup table in accordance with the invention for storingmultiple database formats.

FIG. 6 shows a flowchart of a method for searching the lookup table ofFIG. 5.

DETAILED DESCRIPTION OF AN ILLUSTRATIVE EMBODIMENT

FIG. 3 shows a switching device 50 having a port 52 and portintercommunication logic 54. Port 52 includes a media interface 56, amemory 58, and a search engine 60. The search engine 60 includestemporary packet storage 62, packet analysis and key extraction logic64, an internal binary search engine 66, and forwarding decision logic72. There are multiple ports (not shown) in switching device 50. One ormore ports are located on channel cards (not shown) mounted in achassis. The number of ports and how the ports and portintercommunication logic 54 are mounted within a chassis are based onthe particular application and are not important to the invention.

Media interface 56 connects switching device 50 to a network (not shown)through a network cable 74. The network cable can take a variety offorms (e.g., fiber optic, twisted-pair, coaxial, etc.) depending on thetype of network. A variety of network standards and protocols may beused, such as TCP/IP, IPX/SPX, FDDI, ATM, ETHERNET, GIGABIT ETHERNET,FAST ETHERNET, Token Ring, SONET, etc. Other network protocols,standards, and network cables now existing or later developed may beused with the invention, since these particular aspects are notimportant to the invention. Media interface 56 is a communication linkbetween search engine 60 and the network. Thus, media interface 56allows search engine 60 to send network frames in any desired format andmedia interface 56 reformats the frames for the particular network.Similarly, media interface 56 receives network frames from the networkand formats the frames so they may be read by search engine 60. Themedia interface used is based on the particular application and is notimportant to understanding the invention.

Temporary packet storage 62 within search engine 60 holds the networkframe temporarily while other components within the search enginedetermine where to forward the network frame to, as is further describedbelow. In some circumstances, a decision may be made to not forward thepacket at all. In such cases, the network frame is never passed to theport intercommunication logic. Depending on the size of the networkframe, the temporary packet storage 62 may hold several network frames,or, alternatively, only a portion of a network frame as it is forwardedto another port.

Packet analysis and key extraction logic 64 extracts information, suchas the source and destination addresses from the network frame, andcreates a key which is passed to the binary search engine 66. Details onhow the binary search engine creates the key are further describedbelow. The packet analysis and key extraction logic 64 may also passadditional information to the binary search engine 66, such as virtualLAN information that comes with the network frame or is derived based onthe type of network frame.

Binary search engine 66 is coupled to memory 58. The memory stores alookup table that the binary search engine uses for analyzing networkframes received from media interface 56. A portion of an example lookuptable is shown in FIG. 5 and is further described below. A managementprocessor (not shown) is coupled to search engine 66 and maintains thelookup table in memory 58. Specifically, the management processor maydirect the search engine to delete old table entries, insert new tableentries and generally maintain the table in sorted order so that thesearch engine performs searches efficiently and correctly.

After binary search engine 66 completes the binary search, the resultsare passed to forwarding decision logic 72, which examines the resultsand applies a predetermined set of rules to determine whether thenetwork frame should be forwarded and which port or ports it should beforwarded to. Forwarding decision logic may also examine the level ofpriority of the network frame. Higher priority frames are typicallyforwarded by the switching device 50 before lower priority frames.

When forwarding decision logic determines that a frame is to beforwarded to other ports in switching device 50, it passes the networkframe to the port intercommunication logic 54. Port intercommunicationlogic 54 includes a switch fabric 76 and a switch fabric control 78.Switch fabric 76 can take a variety of forms. For example, the switchfabric can be a cross-bar switch, which is commonly used intelecommunications switching. The cross-bar switch creates a pathbetween a receiving port and a transmitting port so that the networkframe may be passed therebetween. A wide variety of cross-bar switchesmay be used, such as cut-through switches, interim cut-through switches,and store-and-forward switches. Other types of switch fabrics may alsobe used. For example, switch fabric 76 may also be a central memoryusing a bus arbitration device and a central bus. Using a shared-memorybus architecture, all ports access a memory pool located locally on aswitching module or work group switch. The ports can access the centralmemory through a common bus when an arbitration device grants it access.Another possible switch fabric that can be used is a parallel accessshared-memory architecture. In a parallel access shared memory, allports share the central memory. However, a bus arbitration scheme is notused. Instead, every port has a dedicated path into and out of thecentral memory fabric. Therefore, all ports can simultaneously accessthe centralized memory pool at any time. A wide variety of existingswitch fabrics or later developed switch fabrics may also be used. Theparticular switch fabric and switch fabric control is not of importanceto the invention. Indeed, in certain applications of the presentinvention, the switch fabric control and switch fabric may even beexcluded.

Switch fabric control 78 controls network frames as they are passedthrough the switch fabric. In the case where the switch fabric is across-bar switch, the switch fabric control is typically called ascheduler. The scheduler establishes a connection within the cross-barswitch so that a search engine on one port can directly pass a networkframe to a search engine on another port. In the case where the switchfabric is a memory, the switch fabric control tells a receive-sidesearch engine where to store the frame in memory. After the frame isstored in memory, the switch fabric control signals a transmitting-sideport that the network frame is ready to be transmitted and provides theaddress of the memory location where the frame is located. The switchfabric control may also provide priority information to thetransmitting-side port.

FIG. 4 shows a flow chart of a method used by the switching device 50for forwarding network frames. In step 80, the media interface 56receives a network frame from the network and passes the frame to searchengine 60. The network frame contains a destination address thatindicates the ultimate destination for the network frame. In step 82,search engine 60 searches memory 58 to determine whether the destinationaddress from the network frame is located within the lookup table ofmemory 58. If a network address matches the destination address,forwarding information indicating where the frame should be forward tois also obtained from the lookup table. Assuming that the forwardinginformation was properly found in the lookup table and the appropriateport was determined, the search engine passes the search results to theforwarding decision logic, which in turn passes the forwardinginformation to switch fabric control 78 (step 84). In step 86, searchengine 60 transfers the network frame through switch fabric 76. If theswitch fabric is a cross-bar switch, the switch fabric control 78establishes the connection in the switch fabric and communicates tosearch engine 60 when to send the network frame. If the switch fabric isa central memory with or without bus arbitration, the switch fabriccontrol tells search engine 60 where in the switch fabric to store thenetwork frame. Search engine 60 then stores the network frame at theindicated location. The switch fabric control also informs the otherports of where the network frame is stored so that they may properlyaccess it within the switch fabric. Regardless of the technique usedwith the switch fabric, the network frame is obtained from the switchfabric and transmitted on one or more ports (step 88).

FIG. 5 shows a lookup table 90 in accordance with the invention. Thelookup table 90 includes a lookup key field 92 and a forwardinginformation field 94. The lookup key field 92 is the field used by thebinary search engine 66 to search the lookup table. In the illustratedexample, the lookup key field includes an address 96 and formatidentification bits 98. The address 96 may be a network address inaccordance with a network protocol, such as a MAC address (48 bits), anIP address (32 bits), an IPV6 address (128 bits), etc. Other networkaddresses of different lengths also can be used. Additionally, the keycan include other information then the address, such as VLANinformation, IP type-of-service information, and TCP/UDP applicationport numbers. The format identification bits 98 are positioned as themost significant bits (MSB) of the key. Although only two bits are shownfor the format identification bits 98, any number of bits may be used.The illustrated format identification bits allow for 4 differentdatabase formats within a single memory. The databases are listed asforwarding database 0, 1, and 3 and are in different formats, such asMAC, IP, IPV6, etc., although the invention is not limited to anyparticular formats. Forwarding database 0 has a first database entry 100with an address generically shown as ADDR. 0, which can be any desiredlength. For example, if the database format corresponds to a MACprotocol, then ADDR. 0 may be a 48 bit value. The forwarding information94 corresponding to ADDR. 0 is also shown generically and may include aport number and/or other forwarding information. Like the address, theforwarding information 94 may also be any length. The last databaseentry 102 for forwarding database 0 is shown having an ADDR. L-1 where Lindicates the number of entries in the forwarding database 0 (L can beany positive integer). The forwarding database 0 can be customized for aparticular user by changing the number of entries. Thus, the actualmemory location for the last entry 102 can dynamically change if a userdetermines more or less entries are needed in forwarding database 0.Regardless of the number of entries, the format identification bits 98are constant. The illustrated format identification bits are 00 for allentries within forwarding database 0. As described further below, theformat identification bits effectively separate the different forwardingdatabases into groups.

The forwarding database 1 has a first entry 104 shown generically asADDR. 0 and a last entry ADDR. M-1 where forwarding database 1 containsM entries (M is a positive integer). The number of entries M inforwarding database 1 can also dynamically change and can be a numberdiffering from the number of entries in forwarding databases 0 and 3.The format identification bits for forwarding database 1 are 01 anddistinguish forwarding database 1 from the other forwarding databases inthe lookup table 90. The format identification bits 98 also allow eachindividual forwarding database in the lookup table to be sorted inascending or descending order, while the overall lookup also is storedin sorted order to facilitate searching.

Forwarding database 3 has a similar format to those described above withN entries where N is any positive integer that can dynamically change.

Notably, there is no illustrated forwarding database 2. This againillustrates one aspect of the invention where multiple forwardingdatabases are stored in the single lookup table 90 and the number ofentries in each of the forwarding databases can dynamically changewithout wasted memory space. Thus, if a new database format is desired,new entries can be used by moving forwarding database 3 into sparememory address space 108 to open entries up for forwarding database 2.The format identification bits 10 for forwarding database 02 areprepended as the MSB of the addresses.

Thus, each forwarding database can dynamically change in size with newentries added or deleted as desired. Also, memory from one forwardingdatabase can be deleted and reallocated to another forwarding databaseas needed. The format identification bits allow a single search engineto search the entire lookup table 90 without regard to the formats ofthe individual databases. The format identification bits allow thelookup table to remain in sorted order while simultaneously separatingthe lookup table into sections of forwarding databases having differentformats.

FIG. 6 shows a flowchart of a method for searching disparate databaseformats that only requires one search engine and one memory. In step110, a network frame is received in the media interface 56 (See FIG. 3).Based on the protocol associated with the network frame, the packetanalysis and key extraction circuit 64 determines which forwardingdatabase should be searched for the frames forwarding information (step112). For example, if a network frame includes a MAC address other thanthat of the switching device 50, then the search key will be locatedwithin a forwarding database associated with MAC addresses. In step 114,a portion of the search key is obtained explicitly from the networkframe or is derived therefrom based on the characteristics of thenetwork frame (e.g., what port the frame is received on). For example, adestination address may be identified in the network frame, and such anaddress can be used within the search key. In step 116, the search keyis formed by prepending format identification bits to the portion of thesearch key obtained in step 114. Which format identification bits areprepended relates to the determination made in step 112. The full searchkey is then passed to the search engine to conduct the search.

Thus, the invention allows any number of disparate databases within asingle memory. The databases are differentiated based on the formatidentification bits. Each database can be of an arbitrary size and thesize is easily modified by inserting or deleting an entry. Unusedforwarding databases need not be present in memory wasting valuablememory space. However, if it is desired to add a database to the memory,unused format identification bits can be used to add the database. Also,the single memory scheme places no demands on the complexity of thesearch engine since it views the entire memory as a single sorteddatabase.

Having described and illustrated the principles of our invention withreference to preferred embodiments thereof, it will be apparent thatthese embodiments can be modified in arrangement and detail withoutdeparting from the principles of the invention.

For example, although the port 52 is shown as including separatecomponents, such components can be formed in a single integratedcircuit. Additionally, other circuit components, such as the portintercommunication logic 54 can also be included in the same integratedcircuit as the port.

Additionally, any of the components of the switching device can beperformed by hardware, software, or a combination thereof. The inventionshould not be limited to the particular technique (whether hardware orsoftware) for carrying out the methods and apparatus described herein.For example, the search engine can be a microprocessor running softwareor an ASIC where the searches are performed in hardware.

Still further, although the lookup table is shown as containing tableentries with multiple fields, the lookup table can be any type of datastructure or array that stores data.

Yet further, the network packets can include any kind of data includingvideo images, voice data during a phone call, a document, etc.

Still further, when a port receives a network frame, it can analyze thesource/destination address (at layer two and layer three) and it canalso analyze other frame or data payload information includinginformation from the frames layer 2, 3, or 4 headers. Such informationincludes the frames source port, VLAN, encapsulation type, routingprotocol type, IP type-of-service, and TCP/UDP port numbers.

Still yet further, the present invention may be applied to LAN's, WAN's,the Internet, Intranets, telephone networks, or any other network.

Additionally, although the lookup table is described as containingnetwork addresses, the lookup table may include other keys. A key mayinclude a network address exclusively or in combination with additionalinformation, such as the frames VLAN or IP type-of-service information.Alternatively, a key may include lookup information other than networkaddresses. Additionally, the switching device may receive network framesthat include search keys. Alternatively, the search key may be derivedfrom the network frame. For example, the search engine may usecharacteristics of the network frame, such as what port it was receivedon, to derive the search key. The search key, which is either explicitlyincluded in the network frame or derived therefrom, is compared to thelookup table which includes lookup keys.

Additionally, although a binary search engine is used in the illustratedembodiment, other search engines can be used instead, including linearsearch engines, CAM, binary radix trees, hashing, etc.

In view of the many possible embodiments to which the principles orinvention may be applied, it should be recognized that the illustratedembodiment is only a preferred example of the invention and should notbe taken as a limitation on the scope of the invention. Rather, theinvention is defined by the following claims. We therefore claim as theinvention all such embodiments that come within the scope of theseclaims.

We claim:
 1. In a switching device having a plurality of ports, eachport having a plurality of forwarding databases wherein each forwardingdatabase has an associated database format compatible with at least oneformat of a network frame, a method of transmitting the network framewithin a port comprising the steps of: (a) receiving the network framewherein the network frame has a plurality of characteristics comprisinga destination address and a format property; (b) determining a partialsearch key from the destination address of the network frame; (c)determining one or more format identification bits from the formatproperty of the network frame wherein the determined one or more formatidentification bits are associable with one of the plurality offorwarding databases; and (d) generating a full search key byconcatenating, to the partial search key, the one or more formatidentification bits as the most significant bits of a fill search key;(e) identifying a forwarding database associated with the mostsignificant bits of the full search key; (f) searching a plurality offorwarding information entries, according to the full search key, withinthe identified forwarding database; (g) determining, by the searchengine, at least one destination port from the searched forwardinginformation entries; (h) storing the network frame within a switchfabric; and (i) transmitting the network frame from the switch fabricvia the at least one determined port.
 2. The method of claim 1 furthercomprising the steps, preceding the transmitting step, of establishing aconnection in the switch fabric and communicating a network frame sendsignal wherein the switch fabric is a cross-bar switch.
 3. The method ofclaim 1 wherein the step of storing further comprises the steps ofdesignating a network frame storage location within the switch fabric,storing the network frame at the designated location within the switchfabric, and transmitting, by the switch fabric, the network framelocation within the switch fabric to the plurality of ports.
 4. Themethod of claim 1 wherein the plurality of forwarding databases isstored in dynamically allocated memory of a memory device.
 5. The methodof claim 1 wherein the plurality of forwarding databases is containedwithin a single memory device.
 6. The method of claim 1 wherein the atleast one destination port determined by the search engine furtherincludes a null destination.
 7. The method of claim 1 comprising thestep, preceding the transmitting step, of communicating the determinedport to the remaining at least one destination port via the switchfabric.
 8. The method of claim 1 wherein at least one forwardingdatabase comprises forwarding entries supporting an Internet Protocolversion 4(IPv4) protocol format.
 9. The method of claim 1 wherein atleast one forwarding database comprises forwarding entries supporting anInternet protocol version 6 (IPv6) protocol fromat.
 10. The method ofclaim 1 wherein at least one forwarding database comprises forwardingentries supporting a Media Access Control (MAC) format.
 11. A method ofrouting a network frame from a switching device comprising a pluralityof ports and a plurality of forwarding databases, the method comprisingthe steps of: (a) receiving a network frame comprising a networkdestination address and a network frame protocol; (b) extracting one ormore format identification bits from the network frame protocol; (c)generating a search key from the network destination address of thenetwork frame; (d) selecting a forwarding database from the plurality offorwarding databases using said one or more format identification bits,wherein the selected forwarding database comprises forwardinginformation entries characterized by a common network frame protocol,the network frame protocol of the forwarding information entries of eachforwarding database being different than the network frame protocol ofthe forwarding information entries of every other forwarding database;(e) searching the selected forwarding database with the search key; (f)identifying at least one destination port of the plurality of ports fromthe forwarding information entries of the selected forwarding database;and (g) transmitting the network frame towards the at least onedestination port; wherein the search for the destination port is limitedto one or more contiguous forwarding information entries within theselected forwarding database of the plurality of forwarding databases.12. The method of claim 11, wherein one or more of the plurality offorwarding databases comprises forwarding information entriescharacterized by a network frame protocol selected from the groupconsisting of: IPv4, IPv6, IPX, and Appletalk.
 13. The method of claim12, wherein the forwarding information entries of a first forwardingdatabase comprise IPv4 destination addresses and an associated portidentifier, and the forwarding information entries of a secondforwarding database comprise IPv6 destination addresses and anassociated port identifier.
 14. The method of claim 11, wherein theplurality of forwarding databases are sequentially ordered within asingle memory.
 15. The method of claim 14, wherein the step ofgenerating a search key includes the step of prepending the one or moreformat identification bits from the network frame protocol to thepartial search key.
 16. The method of claim 15, wherein the step ofselecting a forwarding database from the plurality of forwardingdatabases occurs automatically due to the presence of the one or moreformat identification bits.